<?php
session_start();
include "system/config/config.php";
include "system/users/userAccess.class.php";
include "system/db/dbconnect.class.php";

$db = new Connection();
$userAccess = new UserAccess();
if ( $_POST['submitted'] == 'submitted') {
	$userAccess->login( $_POST['username'], $_POST['password'] );
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1"  /><meta name="description" content="CSS 3 Column Layout Technique Example."></meta>
<title><?php echo SITENAME ?> Toolbox</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"  />

<style type="text/css" media="screen">	@import "styles/mainstyle.css"; </style>


<link rel="stylesheet" type="text/css" href="styles/ddsmoothmenumain.css" />

<!--[if lte IE 7]>
<style type="text/css">
html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/
</style>
<![endif]-->

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="styles/ie.css" />
<![endif]-->

</head>
<body>
<div id="wrapper">
	<div id="header">	
		<img src="images/header.gif" alt="" />
	</div>
	
	
	<div id="container">
		<div id="side-a">
		<h3>What is the <?php echo SITENAME ?> Toolbox?</h3>
            <p>The <?php echo SITENAME ?> Toolbox is your interactive way to plan, create and order exactly what you want- when you want it!</p>
		</div>
		<div id="content">
			<h3>The Pearfect Solution</h3>
			<h4>The Pearfect Solution is your way to plan, create and order exactly what you want - when you want it!</h4>
			<h4>Login in to use</h4>
			<form id="loginForm" name="loginForm" action="index.php" method="post">
			<input type="hidden" id="submitted" name="submitted" value="submitted" />
			<table>
				<?php
					if ( isset($userAccess->error_message) ){
						echo ("<p class=\"errormsg\">");
						echo ($userAccess->error_message);
						echo ("</p>");
					}
				?>
			<tr><td><label>Username</label></td><td><input type="text" name="username" id="username" /></td></tr>
			<tr><td><label>Password</label></td><td><input type="password" name="password" id="password" /></td></tr>
			<tr><td>&nbsp;</td><td><input type="submit" name="submit" id="submit" value="Submit" /></td></tr>
			</table>
			</form>
			
			<img src="images/loved_up_pears.jpg" style="float: right;" alt="Pears" />
		<p style="clear: both;">If you require a login ID - please contact your Operations Manager</p>
		</div>
	</div>
	<div id="footer">
		<p>&copy; <?php echo (COPYRIGHT); ?> 2009</p>
	</div>
</div>
</body>
</html>